(defun sq-diff (n)
  (- (expt (loop for i from 1 upto n sum i) 2)
     (loop for i from 1 upto n sum  (* i i))))

(defun sq-diff2 (limit)
  (let (diff)
    (loop for i from 1 to limit 
	 sum i into nums
	 sum (expt i 2) into squares
	 finally (setq diff (- (expt nums 2) squares)))
    diff))